package com.chengjie.user.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chengjie.user.mapper.EpidemicPreventionMapper;
import com.chengjie.user.domain.EpidemicPrevention;
import com.chengjie.user.service.IEpidemicPreventionService;

/**
 * 防疫记录Service业务层处理
 * 
 * @author ycj
 * @date 2022-05-02
 */
@Service
public class EpidemicPreventionServiceImpl implements IEpidemicPreventionService 
{
    @Autowired
    private EpidemicPreventionMapper epidemicPreventionMapper;

    /**
     * 查询防疫记录
     * 
     * @param id 防疫记录主键
     * @return 防疫记录
     */
    @Override
    public EpidemicPrevention selectEpidemicPreventionById(Long id)
    {
        return epidemicPreventionMapper.selectEpidemicPreventionById(id);
    }

    /**
     * 查询防疫记录列表
     * 
     * @param epidemicPrevention 防疫记录
     * @return 防疫记录
     */
    @Override
    public List<EpidemicPrevention> selectEpidemicPreventionList(EpidemicPrevention epidemicPrevention)
    {
        return epidemicPreventionMapper.selectEpidemicPreventionList(epidemicPrevention);
    }

    /**
     * 新增防疫记录
     * 
     * @param epidemicPrevention 防疫记录
     * @return 结果
     */
    @Override
    public int insertEpidemicPrevention(EpidemicPrevention epidemicPrevention)
    {
        return epidemicPreventionMapper.insertEpidemicPrevention(epidemicPrevention);
    }

    /**
     * 修改防疫记录
     * 
     * @param epidemicPrevention 防疫记录
     * @return 结果
     */
    @Override
    public int updateEpidemicPrevention(EpidemicPrevention epidemicPrevention)
    {
        return epidemicPreventionMapper.updateEpidemicPrevention(epidemicPrevention);
    }

    /**
     * 批量删除防疫记录
     * 
     * @param ids 需要删除的防疫记录主键
     * @return 结果
     */
    @Override
    public int deleteEpidemicPreventionByIds(Long[] ids)
    {
        return epidemicPreventionMapper.deleteEpidemicPreventionByIds(ids);
    }

    /**
     * 删除防疫记录信息
     * 
     * @param id 防疫记录主键
     * @return 结果
     */
    @Override
    public int deleteEpidemicPreventionById(Long id)
    {
        return epidemicPreventionMapper.deleteEpidemicPreventionById(id);
    }
}
